<?php namespace Summer\Box;

use System\Classes\PluginBase;

class Plugin extends PluginBase
{
    public function registerComponents()
    {
    }

    public function registerSettings()
    {
        return [
            'settings' => [
                'label'       => '盲盒设置',
                'description' => '盲盒设置',
                'category'    => 'HJD',
                'icon'        => 'icon-dropbox',
                'class'       => 'Summer\Box\Models\Settings',
                'permissions' => ['summer.box.permissions.box_setting'],
                'order'       => 600,
            ]
        ];
    }
    public function register()
    {
        //注册控制台命令
        $this->registerConsoleCommand('box.inityeji', 'Summer\Box\Console\Inityeji');
        $this->registerConsoleCommand('box.ordercheck', 'Summer\Box\Console\OrderCheck');
        $this->registerConsoleCommand('box.money_jiaquan', 'Summer\Box\Console\MoneyJiaquan');
        $this->registerConsoleCommand('box.money_jicha', 'Summer\Box\Console\MoneyJicha');
        $this->registerConsoleCommand('box.uplevel', 'Summer\Box\Console\Uplevel');
    }

    /**
     * 首页小部件
     * @return array|\string[][]
     */
    public function registerReportWidgets()
    {
        return [
            'Summer\Box\ReportWidgets\Fafang' => [
                'label'       => '批量发放扣除',
                'context'     => 'dashboard',
            ],
        ];
    }
}
